<!-- Start: slider -->
<div class="slider">
  <div class="container-fluid">
    <div id="heroSlider" class="carousel slide">
      <div class="carousel-inner">
        <?php $active = true;?>
        <?php foreach($projects as $project): ?>
        <div class="<?php  if($active) {echo 'active'; $active = false;}; ?> item">
          <div class="hero-unit">
            <div class="row-fluid">
              <div class="span7 marketting-info">
                <h1><?php echo $project->getTitle();?></h1>
                <p>
                    <?php echo substr($project->getShortdescription(), 0, 10).' ...';?>                    
                </p>
                <h3>
                  <a href="<?php echo $this->url('project/wildcard', array('controller' => 'index', 'action' => 'show', 'id' => $project->getId()));?>" class="btn">Learn more</a>
                </h3>                      
              </div>
              <div class="span5">
                <img src="<?php echo $this->basePath().'/project/pic/'; $img  = $project->getImages(); $path = $img[0]->getPath();  echo isset($path) ?  $path: 'noPhoto.jpg';?>" class="thumbnail">
              </div>
            </div>                  
          </div>
        </div>
        <?php endforeach; ?>
      </div>
      <a class="left carousel-control" href="#heroSlider" data-slide="prev">‹</a>
      <a class="right carousel-control" href="#heroSlider" data-slide="next">›</a>
    </div>
  </div>
</div>
<!-- End: slider -->
<!-- Start: PRODUCT LIST -->
  <div class="container">
    <div class="page-header">
      <h2>New Projects</h2>
    </div>       
    <div class="row-fluid">
      <ul class="thumbnails">
        <?php foreach($projects as $project): ?>
        <li class="span4">
          <div class="thumbnail">
              <img height="150" width="260" src="<?php echo $this->basePath().'/project/pic/'; $img  = $project->getImages(); $path = $img[0]->getPath();  echo isset($path) ?  $path: 'noPhoto.jpg';?>" alt="product name">
              <div class="caption">
              <h3><?php echo $project->getTitle();?></h3>
              <p>
                  <?php echo $project->getShortdescription();?>
              </p>
            </div>
            <div class="widget-footer">
              <p>
                  <a href="<?php echo $this->url('project/wildcard', array('controller' => 'index', 'action' => 'show', 'id' => $project->getId()));?>" class="btn">Read more</a>
              </p>
            </div>
          </div>
        </li>   
        <?php endforeach; ?>
      </ul>
    </div>
      <div class="span8 offset1">
          <h3>Categories</h3>
          <ul class="features">
              <?php foreach ($categories as $category):?>
              <li>
                  <a href="<?php echo $this->url('project/wildcard', array('controller' => 'index', 'action' => 'all'));?>"><i class="icon-ok "></i><?php echo $category->getCategoryName();?></a>
              </li>
              <?php endforeach;?>
          </ul>
      </div> 
  </div>
<!-- End: PRODUCT LIST -->